Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for constructor with parameterName parameter #3665

Merged
merged 1 commit into from
May 27, 2020

Conversation

buyaa-n
Copy link
Contributor

@buyaa-n buyaa-n commented May 21, 2020

Fixes last comment for dotnet/runtime#33763
Related to PR comment apply the rule to the all ArgumentException-derived types (including itself) that have a constructor accepting a paramName parameter, including user-defined types. dotnet/runtime#35717 (comment)

@buyaa-n buyaa-n requested review from mavasani and bartonjs May 21, 2020 19:00
@buyaa-n buyaa-n requested a review from a team as a code owner May 21, 2020 19:00
@buyaa-n buyaa-n changed the title parameterName check Check constructor with parameterName parameter May 21, 2020
@buyaa-n buyaa-n changed the title Check constructor with parameterName parameter Check for constructor with parameterName parameter May 21, 2020
@codecov
Copy link

codecov bot commented May 21, 2020

Codecov Report

Merging #3665 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           master    #3665    +/-   ##
========================================
  Coverage   94.65%   94.65%            
========================================
  Files        1075     1075            
  Lines      245459   245560   +101     
  Branches    14847    14858    +11     
========================================
+ Hits       232336   232439   +103     
  Misses      11072    11072            
+ Partials     2051     2049     -2     

{
public void Test(string first)
{
throw new System.Text.DecoderFallbackException (""first"");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the exceptions derived from ArgumentException but not have a constructor with paramName argument

@mavasani
Copy link
Contributor

@buyaa-n Can you also update your documentation PR for CA2208 to mention the new semantics?

@buyaa-n
Copy link
Contributor Author

buyaa-n commented May 27, 2020

@buyaa-n Can you also update your documentation PR for CA2208 to mention the new semantics?

@mavasani sure, i have updated the doc few days ago, the PR still open https://github.com/MicrosoftDocs/visualstudio-docs-pr/pull/6584/files#diff-36af8621090aedd8637f2a0e4f1fa1f7R32

@buyaa-n buyaa-n merged commit 0283b9c into dotnet:master May 27, 2020
@buyaa-n buyaa-n deleted the add_parameter_check branch September 29, 2020 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants